
//move the input dataset file to hadoop environment
hduser@DBMSLAB-A3-305-19:~$ hadoop fs -put sampletxt.txt sampletxt.txt
19/12/18 14:21:30 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

//run the jar 
hduser@DBMSLAB-A3-305-19:~$ hadoop jar WordCount.jar wcmr.WordCount sampletxt.txt txtop
19/12/18 14:22:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/12/18 14:22:01 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
19/12/18 14:22:02 INFO input.FileInputFormat: Total input files to process : 1
19/12/18 14:22:02 INFO mapreduce.JobSubmitter: number of splits:1
19/12/18 14:22:02 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1576656474301_0002
19/12/18 14:22:02 INFO impl.YarnClientImpl: Submitted application application_1576656474301_0002
19/12/18 14:22:02 INFO mapreduce.Job: The url to track the job: http://localhost:8088/proxy/application_1576656474301_0002/
19/12/18 14:22:02 INFO mapreduce.Job: Running job: job_1576656474301_0002
19/12/18 14:22:06 INFO mapreduce.Job: Job job_1576656474301_0002 running in uber mode : false
19/12/18 14:22:06 INFO mapreduce.Job:  map 0% reduce 0%
19/12/18 14:22:09 INFO mapreduce.Job:  map 100% reduce 0%
19/12/18 14:22:14 INFO mapreduce.Job:  map 100% reduce 100%
19/12/18 14:22:14 INFO mapreduce.Job: Job job_1576656474301_0002 completed successfully
19/12/18 14:22:14 INFO mapreduce.Job: Counters: 49
	File System Counters
		FILE: Number of bytes read=510
		FILE: Number of bytes written=315521
		FILE: Number of read operations=0
		FILE: Number of large read operations=0
		FILE: Number of write operations=0
		HDFS: Number of bytes read=429
		HDFS: Number of bytes written=44
		HDFS: Number of read operations=6
		HDFS: Number of large read operations=0
		HDFS: Number of write operations=2
	Job Counters 
		Launched map tasks=1
		Launched reduce tasks=1
		Data-local map tasks=1
		Total time spent by all maps in occupied slots (ms)=1225
		Total time spent by all reduces in occupied slots (ms)=1398
		Total time spent by all map tasks (ms)=1225
		Total time spent by all reduce tasks (ms)=1398
		Total vcore-milliseconds taken by all map tasks=1225
		Total vcore-milliseconds taken by all reduce tasks=1398
		Total megabyte-milliseconds taken by all map tasks=1254400
		Total megabyte-milliseconds taken by all reduce tasks=1431552
	Map-Reduce Framework
		Map input records=4
		Map output records=45
		Map output bytes=414
		Map output materialized bytes=510
		Input split bytes=113
		Combine input records=0
		Combine output records=0
		Reduce input groups=6
		Reduce shuffle bytes=510
		Reduce input records=45
		Reduce output records=6
		Spilled Records=90
		Shuffled Maps =1
		Failed Shuffles=0
		Merged Map outputs=1
		GC time elapsed (ms)=60
		CPU time spent (ms)=660
		Physical memory (bytes) snapshot=440823808
		Virtual memory (bytes) snapshot=3945713664
		Total committed heap usage (bytes)=309854208
	Shuffle Errors
		BAD_ID=0
		CONNECTION=0
		IO_ERROR=0
		WRONG_LENGTH=0
		WRONG_MAP=0
		WRONG_REDUCE=0
	File Input Format Counters 
		Bytes Read=316
	File Output Format Counters 
		Bytes Written=44

//view output
hduser@DBMSLAB-A3-305-19:~$ hadoop fs -cat txtop/part-r-00000
19/12/18 14:22:32 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
BROWN	12
DONE	2
FOX	13
IS	2
QUICK	14
THIS	2

